<template>
    <div class="child">
        <h4>ChildComponent</h4>
        <p>{{ content }}</p>
        <button @click="changeContent">改变内容</button>
    </div>
</template>

<script setup lang='ts'>
import { ref } from 'vue';

const content = ref('最初的内容')
const changeContent = () => {
    content.value = "更新后的内容"
}

</script>

<style lang="scss" scoped>
.child {
    border: 2px solid pink;
    padding: 10px;
    margin: 10px;
}
</style>